/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pessoas.presenter.apoio;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 *
 * @author jakson
 */
public class OperacaoXml {
    
     public String leituraXml(String xml) throws FileNotFoundException, IOException{

        FileReader arquivo = new FileReader(xml);
        String stringXml = null;
        BufferedReader buffer = new BufferedReader(arquivo);
        int cont = 0;

        while (cont == 0) {

            String linha = buffer.readLine();
            if (linha == null) {
                cont = 1;
            } else {

                stringXml += linha + "\n";
            }
        }
        buffer.close();
        arquivo.close();
        return stringXml;
    }
    
}
